home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / Aug 90 / MacApp.Tech$ 8⁄31⁄90 / 1861-Re Complex Printing-Aug90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  8.0 KB  |  160 lines  |  [TEXT/GEOL]

  1. Item    6252560                         29-Aug-90        15:27PDT
  2.  
  3. From:   PHAROS.TECH                     Pharos Tech, Tech Staff,PRT
  4.  
  5. To:     D4695                           Lucas Arts Editing Systems,PRT
  6.         MACAPP.TECH$                    MacApp Technical
  7.  
  8. Sub:    RE: Complex Printing
  9.  
  10. From: Schmitz, Scott D. on Wed, Aug 29, 1990 6:26 PM
  11. Subject: RE: Complex Printing
  12. To: D4695; MacApp; Schmitz, Scott D.
  13.  
  14. Peter,
  15.  
  16. I sent a similar mail message around 4 weeks ago.  I got no solutions but did
  17. get around a dozen requests to learn of any solutions that I might learn about.
  18.  Alas, I failed to learn a reasonable solution to the "Calc Print Flaw."
  19.  
  20. Peter, if you learn of anything, please post it to MacApp.Tech, I am dying to
  21. hear of any possible solutions!
  22.  
  23. There is a considerable oppurtunity for the MacApp team to improve the print
  24. architecture.  Due to the interest my mail message generated, I know that many
  25. others have also had problems with the MacApp print architecture.  Lets hope we
  26. see some new print objects soon!
  27.  
  28. An idea for an immediate solution to your problem:
  29. You may want to try resizing the view you want to print, do your printing and
  30. then size the view back.  If you do the resizing after the port has been set to
  31. the printer port, these changes would not even show up on the screen.  This
  32. way, the width of a view with scrollbars can be changed to something other than
  33. what you see on the screen.  Be sure that recalcpagebreaks is called after your
  34. resizing as all your page breaks will be different.
  35.  
  36.  
  37. Some larger issues:
  38. I needed to print a view structure quite similar to the Calc demo with the
  39. addition of a text field as well.  I found that if you want to print more than
  40. one view you are out of luck.  You can print views which are nested but if you
  41. don't have a nested view it just doesn't work.
  42.  
  43. I have found that the existing printing architecture has the following
  44. difficulties:
  45. (1) If you want to print a spreadsheet view and then after the spreadsheet view
  46. print some text or you want to print three GridViews, one for the cells, one
  47. for the column names and one for the row names;  The print extent, the page
  48. breaks and the draw pages all assume that you are printing ONE VIEW!  I have
  49. tried overriding several methods such as SetPrintExtent, BreakFollowing, and
  50. DrawPageInterior to work around this problem.  My success was slight.  After
  51. around 7 man-days, I had something which worked great when printing a single
  52. page but was rather poor with multiple page printing.  TStdPrintHandler gives
  53. you lots of great sophisticated stuff such as page breaks which break the page
  54. at intelligent locations, clipping so that you only print what makes sense and
  55. lots more.  The problem is that it all seems to assume a mono view printing
  56. architecture.
  57. (2) The assumption is that you want your printout to look exactly like what the
  58. screen looks like.  For many cases, this is fine.  After all, that's what
  59. WYSWIG is all about.  For those other cases, your possibilities are insuffient
  60. to the task.  For example, If you want to print a database entry screen which
  61. has a few scrolling text fields a few scrolling grid views and a few pop ups,
  62. you would be crazy to want the printout to look exactly like the screen.  After
  63. all, your printout doesn't have scrollbars!  You will need to print the text in
  64. the scrolling text fields and gridviews in their entierety.  Further, there may
  65. be views on the screen which don't make sense to print- for example a pop up
  66. menu may not make any sense to appear on a printout.
  67. (3) Let's say you want to print a view offset (200,300) from the upper left
  68. hand corner of the paper.  I can't see how you can do it!  Making the
  69. DrawContents call draws your view at (0,0) using the origon set due to your
  70. page number.  If you wanted to print anywhere other than (0,0) you are out of
  71. luck.  The clipping, the page breaks and the drawing is all done based on
  72. drawing at (0,0).
  73.  
  74. From personal experience I have found that printing with TStdPrintHandler is
  75. just not reasonably extendable/overridable to allow for the above cases.
  76.  
  77. I would suggest that we need another object which would be derived from
  78. TprintHandle.  This new print handler would allow for the following:
  79. (a) Printing of multiple views.  Instead of the fView field, we could have a
  80. linked list of fViews.  Or perhaps instead a boolean for every view.  The
  81. boolean would specify if that view would print out on a printer.
  82. (b) Ability to place a view anywhere you wanted as far as x,y.  This printing
  83. should be relative to the 0,0 point on the first page or the 0,0 point on a
  84. specific page that you are imaging.  This last point is important when printing
  85. something such as a spreadsheet.
  86.      Take for example the Calc example; Not only do you want the row and column
  87. names to appear along the top and leftmost area of the printout, you want the
  88. row and column names to print along the top and leftmost area of each page.  To
  89. see what I mean, print a large spreadsheet which prints a grid of paper.  A few
  90. pieces of paper along the x axis and a few along the y axis.  From an example
  91. like that it becomes clear that every piece of paper needs row and column
  92. labels - just like Excel prints.  This could be printed in the AdornPage
  93. routine but presently this isn't possible as trying to print any view prints it
  94. at 0,0 relative to the first page!
  95.      What you want, when printing the Row Numbers is to print the RowsView at
  96. an X,Y value where X = 0, relative to page 1 and Y = 0, relative to the current
  97. page you are imaging.  For the Column numbers you would want X = 0, relative to
  98. the current page and Y = 0, relative to page 1.  Your CellsView would need to
  99. be printed not at 0,0 but to the right the width of your Row numbers and down
  100. the height of your column numbers.
  101. (c) Ability to place a view relative to another view.  For example, the
  102. RowsView would abutt the CellView along the leftmost vertical axis of the
  103. CellsView in the Calc demo.  If you could somehow symbolically define this
  104. instead of hard coding x,y offsets you could avoid problems when one view gets
  105. larger when it is printed.  For example, if you want to print some text right
  106. after your spreadsheet, but you don't know how big the spreadsheet is.
  107.  
  108.  
  109. I might have missed something fundimental but I doubt that Calc can be made to
  110. print showing Row & Column titles on each page within the existing print
  111. arctitecture!
  112.  
  113. Scott Schmitz
  114. Pharos
  115. _______________________________________________________________________________
  116. From: D4695        on Wed, Aug 29, 1990 1:33 PM
  117. Subject: Complex Printing
  118. To: Zimmerman, Kent A.
  119.  
  120. Item    4638771                         29-Aug-90        08:38PDT
  121.  
  122. From:   D4695                           Lucas Arts Editing Systems,PRT
  123.  
  124. To:     MACAPP.TECH$                    MacApp Technical
  125.  
  126. Sub:    Complex Printing
  127.  
  128. Yo MacApp Dudes,
  129.  
  130.    In the last few weeks I've seen several questions about printing complex
  131. view structures go unanswered.  And after trying to print a complex view
  132. structure myself I now know why.  Perhaps by giving a specific example based on
  133. a demo program some concrete solutions will surface.
  134.  
  135.    The Calc demo program is an excellent example of a view structure not
  136. uncommon in Mac Applciations - A data area encased by column tiles and row
  137. titles that scroll "together".  In fact USynchScroller is intended specifically
  138. to support just such a structure where multiple scrollers coordinate multiple
  139. views.  Unfortunately this is a very difficult view structure to print in
  140. MacApp and Calc's solution is to only prints the "interior" of the spreadsheet,
  141. refusing to print the column or row titles.   In fact any view hierarchy that
  142. has multiple scrollers can be tough to print.
  143.  
  144.     The problem is not so much that TStdPrintHandler wants a single view to
  145. define the view to be printed, but that scrollers limit the size of the printed
  146. view to their size and translate the view to their translation.  Perhaps There
  147. is a cheap way to make scrollers "invisible" during printing.
  148.  
  149.     If anyone can suggest a real way to print views such as in Calc I would
  150. greatly appreciate hearing about it.
  151.  
  152.     Thanks
  153.  
  154.  
  155.     Peter Young
  156.  
  157.  
  158.  
  159.  
  160.